﻿<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<link href="mx.css" rel="stylesheet" type="text/css">
<title>Commands</title>
</head>

<body>
<p><div class=pgHdr>Commands</div>


Commands can be sent to the target board via UDP messages, or the HTTP GET 
command. All commands follow the HTTP GET syntax of name=value.<p>For example, 
to set Port pin A2, we can:<br>
Send the following <b>HTTP GET command</b> to the target board: <br>
<em><a href="http://10.1.0.1/?a2=1">http://10.1.0.1/?a2=1</a></em> <br>
Or we can send the following <b>UDP message</b> to the UDP Command Port: <br>
<em>a2=1</em> </p>
<p>In this example the name part is &quot;a2&quot; and the value part is &#39;1&#39;.</p>
<h3><a class="anchor" name="mod_cmd_udp">UDP Commands</a></h3>
Any of the commands listed below can be executed on the target by sending them 
to UDP port 54123. This port is configurable, and can be changed.
<p>For example, to set Port pin A2, we can send the following UDP message to the 
target board: <br>
<em>a2=1</em> </p>
<p>Multiple commands can be send by seperating each command with a &#39;&amp;&#39; 
character. For example, to set Port pin A2, and clear Port C0, we can send the 
following UDP message to the target board: <br>
<em>a2=1&amp;c0=0</em></p>
<h3><a class="anchor" name="mod_cmd_httpget">HTTP GET Commands</a></h3>
Any of the commands listed below can be executed on the target by using the HTTP 
GET command. To issue a HTTP GET command, simply append the command to the web 
page address, after a &#39;?&#39; character.
<p>For example, to set Port pin A2, we can send the following HTTP GET command 
to the target board: <br>
<em><a href="http://10.1.0.1/?a2=1">http://10.1.0.1/?a2=1</a></em> </p>
<p>Multiple commands can be send by seperating each command with a &#39;&amp;&#39; 
character. For example, to set Port pin A2, and clear Port C0, we can send the 
following HTTP GET command to the target board: <br>
<em><a href="http://10.1.0.1/?a2=1&amp;c0=0">http://10.1.0.1/?a2=1&amp;c0=0</a></em>
</p>
<p>For details, see
<a class="el" href="../../../doxygen/html/group__mod__tcpip__httpsrvr__cgi.html">
CGI</a></p>
<h3><a class="anchor" name="mod_cmd_defined">Defined Commands</a></h3>
The following list of commands are implemented by the Modtronix SBC65EC Web 
Server in the &quot;httpexec.c&quot; file. This file can be modified by the user to add 
aditional commands:<br>
<ul>
	<li>Command group <b>a</b> to <b>j</b> -
	<a class="el" href="#mod_cmd_ref_ios">
	Port Commands</a></li>
	<li>Command group <b>k</b> -
	<a class="el" href="#mod_cmd_ref_config">
	Application Config Commands</a></li>
	<li>Command group <b>l</b> -
	<a class="el" href="#mod_cmd_ref_general">
	General Commands</a></li>
	<li>Command group <b>m</b> -
	<a class="el" href="#mod_cmd_ref_short">
	Short Commands</a></li>
	<li>Command group <b>m</b> -
	<a class="el" href="#mod_cmd_ref_serial">
	Serial Communication Commands</a></li>
	<li>Command group <b>w</b> -
	<a class="el" href="#mod_cmd_ref_pwm">
	PWM Commands</a></li>
	<li>Command group <b>x</b> -
	<a class="el" href="#mod_cmd_ref_xbrd">
	Expansion Board Commands</a></li>
</ul>
<p></p>
<hr>
<h3><a class="anchor" name="mod_cmd_ref_ios">Port Commands</a></h3>
The following syntax is used in the Port commands:<ul>
	<li><b>p</b> - is the <em>Command Group</em>, and represents the Port. It 
	has a value from <b>a</b> to <b>g</b>.</li>
	<li><b>[x,y]</b> - This should be replaced by either x or y</li>
	<li><b>[x-z]</b> - This should be replaced by a value in the range from x to 
	z</li>
</ul>
<p>The following Port commands are implemented by the Modtronix SBC65EC Web 
Server.
<table class="compactTable" border="1" cellpadding="2" cellspacing="0">
	<tr width="100%">
		<td align="center" nowrap="nowrap"><i>Command Syntax</i></td>
		<td align="center"><i>Description</i></td>
	</tr>
	<tr>
		<td><code>p=XX</code></td>
		<td><b>Set Port</b> - set the given Port to the given hex value. The 
		given hex value (<i>XX</i> part or command) must be in uppercase! For 
		example: <br>
		&quot;<code>a=8A</code>&quot; will set Port A to 0x8A. </td>
	</tr>
	<tr>
		<td><code>p[0-7]=[1,0]</code></td>
		<td><b>Set Port Pin</b> - set or clear the given Port pin. For example:
		<br>
		&quot;<code>a0=0</code>&quot; will clear Port A0 (Port A, pin 0) <br>
		&quot;<code>f7=1</code>&quot; will set Port F7 (Port F, pin 7) </td>
	</tr>
	<tr>
		<td><code>px[0-7]=[1,0]</code></td>
		<td><b>Inverted Set Port Pin</b> - Set or clear the given Port pin. The 
		value is inverted! For example: <br>
		&quot;<code>ax0=0</code>&quot; will set Port A0 (Port A, pin 0) <br>
		&quot;<code>fx7=1</code>&quot; will clear Port F7 (Port F, pin 7) </td>
	</tr>
	<tr>
		<td><code>p[0-7]r=[1,0]</code></td>
		<td><b>Set Port Pin, Remember</b> - - Same as &quot;Set Port Pin&quot; command, 
		except that the settings are saved to the application configuration, and 
		are remembered after power up. </td>
	</tr>
	<tr>
		<td><code>p[0-7]p=[0-9]</code></td>
		<td><b>Pulse Port Pin, Positive</b> - The given Port pin is set high and 
		then low again. The value gives the &#39;pulse width&#39; specifying for how 
		many micro seconds the pin should be kept high. If 0, the pin is kept 
		high for a minimum time, which is usually between 200ns to 400ns. For 
		example: <br>
		&quot;<code>a0p=0</code>&quot; will set Port A0 high and after 200ns to 400ns low 
		again <br>
		&quot;<code>f7p=9</code>&quot; will set Port F7 high and after 9us low again </td>
	</tr>
	<tr>
		<td><code>p[0-7]n=[0-9]</code></td>
		<td><b>Pulse Port Pin, Negative</b> - The given Port pin is set low and 
		then high again. The value gives the &#39;pulse width&#39; specifying for how 
		many micro seconds the pin should be kept low. If 0, the pin is kept low 
		for a minimum time, which is usually about 200ns to 400ns. For example:
		<br>
		&quot;<code>a0n=0</code>&quot; will set Port A0 low and after 200ns to 400ns high 
		again <br>
		&quot;<code>f7n=5</code>&quot; will set Port F7 low and after 5us high again </td>
	</tr>
	<tr>
		<td><code>pc[0-7]=[1,0]</code></td>
		<td><b>Port Pin Configuration</b> - Configure given Port pin as input or 
		output. &#39;0&#39; will configure pin to be an output, and &#39;1&#39; an input. The 
		port direction configured with this command will NOT be remembered after 
		the next power up, use the &quot;Port Pin Configuration, Remember&quot; command to 
		achieve this! Example to use this command: <br>
		&quot;<code>ac0=0</code>&quot; will configure Port A0 (Port A, pin 0) to be an 
		output. <br>
		&quot;<code>fc7=1</code>&quot; will configure Port F7 (Port F, pin 7) to be an 
		input </td>
	</tr>
	<tr>
		<td><code>pc[0-7]r=[1,0]</code></td>
		<td><b>Port Pin Configuration, Remember</b> - Same as &quot;Port Pin 
		Configuration&quot; command, except that the settings are saved to the 
		application configuration, and are remembered after power up. </td>
	</tr>
</table>
</p>
<p>Examples:<br>
<table class="compactTable" border="1" cellpadding="2" cellspacing="0">
	<tr width="100%">
		<td align="center" nowrap="nowrap"><i>Example GET command</i></td>
		<td align="center"><i>Description</i></td>
	</tr>
	<tr>
		<td><code>f=01</code></td>
		<td>This example will set Port F to 0x01</td>
	</tr>
	<tr>
		<td><code>c5=1</code></td>
		<td>This example will set Port C5</td>
	</tr>
	<tr>
		<td><code>bx0=1</code></td>
		<td>This example will clear Port B0</td>
	</tr>
</table>
An example of sending a GET command to a target board with an IP address of 
&quot;10.1.0.1&quot; is:<br>
<a href="http://10.1.0.1/?f=01">http://10.1.0.1/?f=01</a> <br>
This command can be sent by entering the line above in a standard web browser, 
or could be send by custom software.</p>
<p></p>
<hr>
<h3><a class="anchor" name="mod_cmd_ref_config">Application Config Commands</a></h3>
The Application Config Command is used to modifying the
Application Configuration bytes. To see what can be configured with this 
command, please have a look at the list of
<a class="el" href="../../../doxygen/html/appcfg_8h.html#307c9d3a0867a5744bfa7a702d07b981">
Application Configuration bytes</a>.<p>The following Config commands are 
implemented by the Modtronix SBC65EC Web Server.
<table class="compactTable" border="1" cellpadding="2" cellspacing="0">
	<tr width="100%">
		<td align="center" nowrap="nowrap"><i>Command Syntax</i></td>
		<td align="center"><i>Description</i></td>
	</tr>
	<tr>
		<td><code>kxx=[0-255]</code></td>
		<td><b>Set Config Byte to given decimal value</b> - set the given config 
		byte to the given decimal value. The &#39;xx&#39; part gives the offset (in 
		uppercase hex) of the config byte in the
		Application Configuration bytes structure. The value has to be a 
		decimal number from 0 - 255. <br>
		Examples to use this command:
		<p>&quot;k00=100&quot; Will set the the &quot;Application Configuration byte&quot; at 0x00 
		(MSB of IP address) to 100 </p>
		<p>&quot;k2A=16&quot; Will set the &quot;Application Configuration byte&quot; at 0x2A (Port 
		F direction) to 16 (0x0f). Address 0x2A contains the TRIS register for 
		Port F. Setting a bit to 0 will configure the port as an output, and 1 
		as an input. In this example we set TRISF to 0x0f = binary 00001111. 
		This will configure port F pins 0-3 as inputs, and pins 4-7 as outputs.
		</p>
		<p>&quot;k2F=16&quot; Will set the &quot;Application Configuration byte&quot; at 0x2F (Port 
		F default value) to 10 (0x0a). Address 0x2F contains the default value 
		for Port F at power up. In this example we set it to 0x0a = binary 
		00001010. This will set the default value of port F pins 1 and 3 to 1 
		(5V), and pins 0, 2, 4, 5, 6, 7 to 0 (0V) at power up. </p>
		</td>
	</tr>
	<tr>
		<td><code>kxx=Hyy</code></td>
		<td><b>Set Config Byte to given hex value</b> - set the given config 
		byte to the given hex value. The &#39;xx&#39; part gives the offset (in 
		uppercase hex) of the config byte in the
		Application Configuration bytes structure. The value (&#39;yy&#39; part of 
		command) has to be an uppercase hex value from 00 - FF. <br>
		Examples to use this command:
		<p>&quot;k00=H1F&quot; Will set the &quot;Application Configuration byte&quot; at 0x00 (MSB 
		of IP address) to 0x1F </p>
		</td>
	</tr>
	<tr>
		<td><code>kxxmzz=Hyy</code></td>
		<td><b>Set Config Byte to given hex value, using mask</b> - set the 
		given config byte to the given hex value, using the given mask. The &#39;xx&#39; 
		part gives the offset (in uppercase hex) of the config byte in the
		Application Configuration bytes structure. The &#39;zz&#39; part gives the 
		mask (in uppercase hex) of the bits in the config byte to change. If the 
		mask is 00, no bits are changed. If the mask is FF, all bits are set to 
		the given value. The value (&#39;yy&#39; part of command) has to be an uppercase 
		hex value from 00 - FF. <br>
		Examples to use this command:
		<p>&quot;k05m04=HFF&quot; Will set the third bit (bit position 2) of the 
		&quot;Application Configuration byte&quot; at 0x05. </p>
		<p>&quot;k1Am80=H00&quot; Will clear the eighth bit (bit position 7) of the 
		&quot;Application Configuration byte&quot; at 0x1A. </p>
		</td>
	</tr>
	<tr>
		<td><code>kxxby=[0,1]</code></td>
		<td><b>Set or Clear bit in Config Byte</b> - set or clear a bit in the 
		given config byte to the given value. The &#39;xx&#39; part gives the offset (in 
		uppercase hex) of the config byte in the
		Application Configuration bytes structure. The &#39;y&#39; part gives the 
		position (value from &#39;0&#39; to &#39;7&#39;) of the bit in the config byte to 
		change. The value has to be a &#39;0&#39; or &#39;1&#39; character, indicating if the 
		given bit is to be cleared or set. <br>
		Examples to use this command:
		<p>&quot;k05b6=1&quot; Will set the seventh bit (bit position 6) of the 
		&quot;Application Configuration byte&quot; at 0x05. </p>
		<p>&quot;kA5b0=0&quot; Will clear the first bit (bit position 0) of the 
		&quot;Application Configuration byte&quot; at 0xA5. </p>
		</td>
	</tr>
</table>
</p>
<p>Examples:<br>
An example of sending a GET command to a target board with an IP address of 
&quot;10.1.0.1&quot; is:<br>
<a href="http://10.1.0.1/?k1A=22">http://10.1.0.1/?k1A=22</a> <br>
This command can be sent by entering the line above in a standard web browser, 
or could be send by custom software. <br>
An example of sending a GET command to a target board with an NetBIOS address of 
&quot;MXBOARD&quot; is:<br>
<a href="http://mxboard/?k1A=22">http://mxboard/?k1A=22</a> <br>
This command can be sent by entering the line above in a standard web browser, 
or could be send by custom software.</p>
<p></p>
<hr>
<h3><a class="anchor" name="mod_cmd_ref_busconfig">Bus Config Commands</a></h3>
The Bus Config Command is used to modifying the
Bus Configuration bytes. To see what can be configured with this command, 
please have a look at the list of
Bus Configuration bytes. This command has exactly the same systext as the
Application Config Commands command, except that it starts with a &#39;u&#39; in 
stead of a &#39;k&#39; character.<p></p>
<hr>
<h3><a class="anchor" name="mod_cmd_ref_general">General Commands</a></h3>
The General command has the following syntax: <code>&quot;lx=v&quot;</code><ul>
	<li>The &#39;l&#39; part is the <em>Command Group</em>, and indicates this is a <em>
	General Command</em>.</li>
	<li>The &#39;x&#39; part is the <em>Command Code</em>, and specifies the command 
	that is to be executed.</li>
	<li>The &#39;v&#39; part is the command operand, and is command specific.</li>
</ul>
<p>The following General commands are implemented by the Modtronix SBC65EC Web 
Server.
<table class="compactTable" border="1" cellpadding="2" cellspacing="0">
	<tr width="100%">
		<td align="center" nowrap="nowrap"><i>Command Syntax</i></td>
		<td align="center"><i>Description</i></td>
	</tr>
	<tr>
		<td><code>la=str</code></td>
		<td><b>New Username</b> - assigns a new Username. The given &quot;str&quot; is the 
		new username, and must be an alpha numeric string of 1 to 8 characters. 
		For example: <br>
		&quot;<code>la=wombat</code>&quot; will set the new username to &quot;wombat&quot;.</td>
	</tr>
	<tr>
		<td><code>lb=str</code></td>
		<td><b>New Password</b> - assigns a new Password. The given &quot;str&quot; is the 
		new password, and must be an alpha numeric string of 1 to 8 characters. 
		For example: <br>
		&quot;<code>lb=gumtree</code>&quot; will set the new username to &quot;gumtree&quot;.</td>
	</tr>
	<tr>
		<td><code>le=XX</code></td>
		<td><b>Enable Events</b>. This command will enable/disable the given 
		Event ports. The command value (XX part) is a two character, uppercase 
		hex value indicating which ports are to be enabled. Each bit in the byte 
		represents an Event Port. Bit 0 represents the UDP event port, bits 1 to 
		7 are reserved for future use. <br>
		Examples to use this command are: <br>
		&quot;le=01&quot; will enable the UDP event port, and disable all others. <br>
		&quot;le=00&quot; will disable all event ports. </td>
	</tr>
	<tr>
		<td><code>lk=str</code></td>
		<td><b>Write Byte Array to LCD Display</b> - write given bytes to the 
		LCD display. A &#39;_&#39; escape character can be used to send hex values. The 
		two bytes following the escape character gives the hex code. See LCD2S 
		documentation for list of all commands, and their syntax. For example, 
		the syntax for the LCD brighness command is <i>&quot;0x81, value&quot;</i>, where
		<i>value</i> is the new brightness value in hex from 00-FF (decimal 
		0-255). To set the brighness to a hex value of A0 (160 decimal), the 
		following command can be send: <br>
		&quot;<code>lk=_81_A0</code>&quot; <br>
		To instruct the LCD display to remember the brightness setting after the 
		power is removed, the command above must be preceded by a &quot;Remember 
		Command&quot; (0x8D). Commands are seperated by a &#39;&amp;&#39; character. The syntax 
		for sending a remember command, followed by the set brighness command 
		shown above will be: <br>
		&quot;<code>lk=_8D&amp;lk=_81_A0</code>&quot; <br>
		<br>
		To include a &#39;_&#39; character, two &#39;_&#39; characters must be send after each 
		other. </td>
	</tr>
	<tr>
		<td><code>ll=str</code></td>
		<td><b>Write String to LCD Display</b> - writes the given string to the 
		LCD display. A &#39;_&#39; escape character can be used to include one of the 
		following LCD string escape sequences: <br>
		_n = Go to beginning of next line. <br>
		_f = Clear display and go to beginning of first line. <br>
		_r = Go to beginning of first line <br>
		_b = Cursor left <br>
		_t = Cursor Right For example: <br>
		<br>
		Clear display, go to the beginning of the first line and write &quot;Hello&quot;:
		<br>
		&quot;<code>ll=_fHello</code>&quot; <br>
		<br>
		Clear display, write &quot;Hello&quot; on first line, and &quot;world&quot; on second line:
		<br>
		&quot;<code>ll=_fHello_nworld</code>&quot; <br>
		<br>
		To include a &#39;_&#39; character, two &#39;_&#39; characters must be send after each 
		other. </td>
	</tr>
	<tr>
		<td><code>ln=str</code></td>
		<td><b>New NetBIOS name</b> - assigns a new NetBIOS name. The given 
		&quot;str&quot; is the new name, and must be an alpha numeric string of 1 to 15 
		characters. For example: <br>
		&quot;<code>lb=CROC1</code>&quot; will set the new username to &quot;CROC1&quot;.</td>
	</tr>
</table>
</p>
<p>Examples:<br>
The following example will log in an user with username=&quot;admin&quot; and 
password=&quot;pw&quot; to a target with an IP address of &quot;10.1.0.1&quot;:<br>
<a href="http://10.1.0.1/?lu=admin&amp;lp=pw">http://10.1.0.1/?lu=admin&amp;lp=pw</a>
<br>
This command can be sent by entering the line above in a standard web browser, 
or could be send by custom software.</p>
<p></p>
<hr>
<h3><a class="anchor" name="mod_cmd_ref_short">Short Commands</a></h3>
Short commands do not have any command operands. They always have the following 
syntax: <code>&quot;m=v&quot;</code><ul>
	<li>The &#39;m&#39; part is the <em>Command Group</em>, and indicates this is a <em>
	Short Command</em>.</li>
	<li>The &#39;v&#39; part is the <em>Command Code</em>, and specifies the command 
	that is to be executed.</li>
</ul>
<p>The following Short commands are implemented by the Modtronix SBC65EC Web 
Server.
<table class="compactTable" border="1" cellpadding="2" cellspacing="0">
	<tr width="100%">
		<td align="center" nowrap="nowrap"><i>Command Syntax</i></td>
		<td align="center"><i>Description</i></td>
	</tr>
	<tr>
		<td><code>m=r</code></td>
		<td><b>Reset Board</b> - reset&#39;s the board. This command can be used to 
		remotely reset the board. This can be used to update the firmware via 
		the network bootloader for example.</td>
	</tr>
	<tr>
		<td><code>m=o</code></td>
		<td><b>Log Out</b> - log out the current user. This command is only used 
		for the HTTP Get Method!</td>
	</tr>
	<tr>
		<td><code>m=l</code></td>
		<td><b>Log In</b> - For Web Server, this command will request the user 
		to log in.</td>
	</tr>
</table>
</p>
<p>Examples:<br>
The following example will reset a target with an IP address of &quot;10.1.0.1&quot;:<br>
<a href="http://10.1.0.1/?m=r">http://10.1.0.1/?m=r</a> <br>
This command can be sent by entering the line above in a standard web browser, 
or could be send by custom software.</p>
<p></p>
<hr>
<h3><a class="anchor" name="mod_cmd_ref_serial">Serial Communication Commands</a></h3>
The following Serial Communication commands are implemented by the Modtronix 
SBC65EC Web Server. <b>To be added in future version !</b><p></p>
<hr>
<h3><a class="anchor" name="mod_cmd_ref_pwm">PWM Commands</a></h3>
The following PWM (Pulse Width Modulator) commands are implemented by the 
Modtronix SBC65EC Web Server. These commands are used to enable and set the 
frequency and values of the PWM channels. <br>
<table class="compactTable" border="1" cellpadding="2" cellspacing="0">
	<tr width="100%">
		<td align="center" nowrap="nowrap"><i>Command Syntax</i></td>
		<td align="center"><i>Description</i></td>
	</tr>
	<tr>
		<td nowrap="nowrap"><code>w[1-4]=[0-1023]</code></td>
		<td><b>Set PWM Value</b>. This command will set the value (Duty Cycle) 
		of the given PWM channel. The possible values must be in the range 0-255 
		for 8-bit mode, and 0-1023 for 10-bit mode. A value of 0 will give a 
		duty cycle of 0% (output off), where a maximum value will give a duty 
		cycle of 100% (permanently on). <br>
		Examples to use this command: <br>
		&quot;w1=128&quot; will set the duty cycle of PWM channel 1 to 50% when in 8-bit 
		mode <br>
		&quot;w3=256&quot; will set the duty cycle of PWM channel 3 to 25% when in 10-bit 
		mode </td>
	</tr>
	<tr>
		<td nowrap="nowrap"><code>w[1-4]r=[0-1023]</code></td>
		<td><b>Set PWM Value, Remember</b>. Same as the <i>Set PWM Value</i> 
		command, except that the settings are saved to the application 
		configuration, and are remembered after power up.</td>
	</tr>
	<tr>
		<td><code>wf=[0-3]</code></td>
		<td><b>Set PWM Frequency</b>. This command will set the PWM frequency. 
		The available frequencies depends on the PWM mode (8-bit or 10-bit) 
		used. The frequency is given by a constant value between 0 to 3. <br>
		For <b>8-bit mode</b>, the following values are defined: <i>0 and 1</i>=9.766kHz,
		<i>2</i>=39.062kHz, <i>3</i>=156.25kHz <br>
		For <b>10-bit mode</b>, the following values are defined: <i>0</i>=2.441kHz,
		<i>1</i>=9.766kHz, <i>2 and 3</i>=39.062kHz </td>
	</tr>
	<tr>
		<td><code>wfr=[0-3]</code></td>
		<td><b>Set PWM Frequency, Remember</b>. Same as the <i>Set PWM Frequency</i> 
		command, except that the settings are saved to the application 
		configuration, and are remembered after power up.</td>
	</tr>
	<tr>
		<td><code>we=XX</code></td>
		<td><b>Enable PWM Channels</b>. This command will enable/disable the 
		given PWM channels. The command value (XX part) is a two character, 
		uppercase hex value indicating which channels are to be enabled. Each 
		bit in the byte represents a PWM channel. Bit 0 represents PWM channel 
		1, bit 1 PWM channel 2, ...., and bit 7 PWM channel 8. The SBC65EC has 4 
		PWM channels (C1, C2, G0 and G3), so only the fist 4 bits are used.<p>
		Examples to use this command are: <br>
		&quot;we=00&quot; will disable all channels <br>
		&quot;we=1F&quot; will enable PWM channels 1 to 5, and disable all the rest (if 
		any) <br>
		&quot;we=14&quot; will enable PWM channel 3 and 5, and disable all the rest (if 
		any) </p>
		</td>
	</tr>
	<tr>
		<td><code>wer=XX</code></td>
		<td><b>Enable PWM Channels,Remember</b>. Same as the <i>Enable PWM 
		Channels</i> command, except that the settings are saved to the 
		application configuration, and are remembered after power up.</td>
	</tr>
	<tr>
		<td><code>wm=[8,a]</code></td>
		<td><b>Set PWM Mode</b>. This command will set the PWM mode. When the 
		value is &#39;8&#39;, the mode is set to 8-bit mode. When the value is &#39;a&#39;, the 
		mode is set to 10-bit mode. </td>
	</tr>
	<tr>
		<td><code>wmr=[8,a]</code></td>
		<td><b>Set PWM Mode, Remember</b>. Same as the <i>Set PWM Mode</i> 
		command, except that the settings are saved to the application 
		configuration, and are remembered after power up.</td>
	</tr>
</table>
<p>Examples:<br>
The following example will enable PWM channels 1 and 2 (bit 0 and 1 = hex 0x03) 
of a target with a NetBIOS address of &quot;MXBOARD&quot;:<br>
<a href="http://MXBOARD/?we=03">http://MXBOARD/?we=03</a> <br>
This command can be sent by entering the line above in a standard web browser, 
or could be send by custom software.</p>
<p></p>
<hr>
<h3><a class="anchor" name="mod_cmd_ref_xbrd">Expansion Board Commands</a></h3>
The following Expansion Board commands are implemented by the Modtronix SBC65EC 
Web Server. These commands are used to configure and control a possible 
expansion board that could be plugged into the daughter board connector of the 
SBC65EC.
<table class="compactTable" border="1" cellpadding="2" cellspacing="0">
	<tr width="100%">
		<td align="center" nowrap="nowrap"><i>Command Syntax</i></td>
		<td align="center"><i>Description</i></td>
	</tr>
	<tr>
		<td><code>xr1=[0,1]</code></td>
		<td><b>Set Relay 1 of Expansion board</b> - 0 will turn relay off, 1 
		will turn it on. Only executed if expansion board has such a relay.</td>
	</tr>
	<tr>
		<td><code>xr2=[0,1]</code></td>
		<td><b>Set Relay 2 of Expansion board</b> - 0 will turn relay off, 1 
		will turn it on. Only executed if expansion board has such a relay.</td>
	</tr>
	<tr>
		<td><code>xr3=[0,1]</code></td>
		<td><b>Set Relay 3 of Expansion board</b> - 0 will turn relay off, 1 
		will turn it on. Only executed if expansion board has such a relay.</td>
	</tr>
	<tr>
		<td><code>xr4=[0,1]</code></td>
		<td><b>Set Relay 4 of Expansion board</b> - 0 will turn relay off, 1 
		will turn it on. Only executed if expansion board has such a relay.</td>
	</tr>
	<tr>
		<td><code>xr5=[0,1]</code></td>
		<td><b>Set Relay 5 of Expansion board</b> - 0 will turn relay off, 1 
		will turn it on. Only executed if expansion board has such a relay.</td>
	</tr>
	<tr>
		<td><code>xo1=[0,1]</code></td>
		<td><b>Set Digital Output 1</b> - 0 will turn output off (set to 0V for 
		most boards), 1 will turn it on (set to 5V for most boards). Only 
		executed if expansion board has such an output, and it is enabled.</td>
	</tr>
	<tr>
		<td><code>xo2=[0,1]</code></td>
		<td><b>Set Digital Output 2</b> - 0 will turn output off (set to 0V for 
		most boards), 1 will turn it on (set to 5V for most boards). Only 
		executed if expansion board has such an output, and it is enabled.</td>
	</tr>
	<tr>
		<td><code>xo3=[0,1]</code></td>
		<td><b>Set Digital Output 3</b> - 0 will turn output off (set to 0V for 
		most boards), 1 will turn it on (set to 5V for most boards). Only 
		executed if expansion board has such an output, and it is enabled.</td>
	</tr>
	<tr>
		<td><code>xo4=[0,1]</code></td>
		<td><b>Set Digital Output 4</b> - 0 will turn output off (set to 0V for 
		most boards), 1 will turn it on (set to 5V for most boards). Only 
		executed if expansion board has such an output, and it is enabled.</td>
	</tr>
	<tr>
		<td><code>xo5=[0,1]</code></td>
		<td><b>Set Digital Output 5</b> - 0 will turn output off (set to 0V for 
		most boards), 1 will turn it on (set to 5V for most boards). Only 
		executed if expansion board has such an output, and it is enabled.</td>
	</tr>
	<tr>
		<td><code>xo6=[0,1]</code></td>
		<td><b>Set Digital Output 6</b> - 0 will turn output off (set to 0V for 
		most boards), 1 will turn it on (set to 5V for most boards). Only 
		executed if expansion board has such an output, and it is enabled.</td>
	</tr>
	<tr>
		<td><code>xo7=[0,1]</code></td>
		<td><b>Set Digital Output 7</b> - 0 will turn output off (set to 0V for 
		most boards), 1 will turn it on (set to 5V for most boards). Only 
		executed if expansion board has such an output, and it is enabled.</td>
	</tr>
	<tr>
		<td><code>xo8=[0,1]</code></td>
		<td><b>Set Digital Output 8</b> - 0 will turn output off (set to 0V for 
		most boards), 1 will turn it on (set to 5V for most boards). Only 
		executed if expansion board has such an output, and it is enabled.</td>
	</tr>
</table>
<p>Examples:<br>
<table class="compactTable" border="1" cellpadding="2" cellspacing="0">
	<tr width="100%">
		<td align="center" nowrap="nowrap"><i>Example GET command</i></td>
		<td align="center"><i>Description</i></td>
	</tr>
	<tr>
		<td><code>xr1=1</code></td>
		<td>This example will set enable relay 1</td>
	</tr>
	<tr>
		<td><code>xr3=0</code></td>
		<td>This example will set disable relay 3</td>
	</tr>
	<tr>
		<td><code>xo2=1</code></td>
		<td>This example will set digital output 2</td>
	</tr>
</table>
<br>
An example of sending a GET command to a target board with an IP address of 
&quot;10.1.0.1&quot; is:<br>
<a href="http://10.1.0.1/?xr3=0">http://10.1.0.1/?xr3=0</a> <br>
This command can be sent by entering the line above in a standard web browser, 
or could be send by custom software.</p>
<h3><a class="anchor" name="mod_cmd_ref_rtc">Real Time Clock commands</a></h3>

<table class="compactTable" border="1" cellpadding="2" cellspacing="0">
	<tr width="100%">
		<td align="center" nowrap="nowrap"><i>Example GET command</i></td>
		<td align="center" style="width: 424px"><i>Description</i></td>
	</tr>
	<tr>
		<td><code>xtY=2009</code></td>
		<td style="width: 424px">This will set the year to 2009</td>
	</tr>
	<tr>
		<td><code>x</code>tM=12</td>
		<td style="width: 424px">This will set the Month to 12 December</td>
	</tr>
	<tr>
		<td><code>xtD=27</code></td>
		<td style="width: 424px">This will set the Day to 27</td>
	</tr>
	<tr>
		<td>xtH=8</td>
		<td style="width: 424px">This will set the Hour to 08</td>
	</tr>
	<tr>
		<td>xtm=22</td>
		<td style="width: 424px">This will set the minutes to 22</td>
	</tr>
	<tr>
		<td>xts=33</td>
		<td style="width: 424px">This will set the seconds to 33</td>
	</tr>
</table>

</body>
</html>
